<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>示例6</title>
    <script>
        //class Person {} 
        // 等价于 
        class Person {
            constructor() {}
        }
        let person1 = new Person();
        // 正常：Person {} 
        console.log(person1)
        // 报错：TypeError: Class constructor Person cannot be invoked without 'new' 
        let person2 = Person();
    </script>


</head>

<body></body>

</html>